import axios from "axios";
import { ElMessage } from "element-plus";
const instance = axios.create({
  baseURL: "",
  timeout: 100000
});
instance.interceptors.request.use(
  (config) => {},
  (error) => {
    // do something with request error
    console.log(error); // for debug
    return Promise.reject(error);
  }
);
instance.interceptors.response.use(
  (response) => {},
  (error) => {
    console.log("err" + error); // for debug
    Message({
      message: error.message,
      type: "error",
      duration: 5 * 1000
    });
    return Promise.reject(error);
  }
);
